package com._520it.crm.web.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com._520it.crm.domain.InsureGuide;
import com._520it.crm.service.IInsureGuideService;
import com._520it.crm.util.JsonResult;
@Controller
public class InsureGuideController {
	@Autowired
	private IInsureGuideService service;
	@RequestMapping("/insure_selectAll")
	@ResponseBody
	public List<InsureGuide> selectAll(){
		return service.selectAll();
	}
	@RequestMapping(value="/insure/save",produces="application/json;charset=utf-8")
	@ResponseBody
	public Object save(InsureGuide insure){
		service.insert(insure);
		return JsonResult.createSuccess();
	}
	
	@RequestMapping("/insure/index")
	public String InsureIndex(){
		return "insure/index";
	}
	
}
